<template>
  <div>
    <v-header></v-header>
    <div class="ris_cont">
      <div class="collar_cont_headPar">
        <table class="collar_cont_head">
          <tr>
            <td>门诊号/住院号</td>
            <td><input type="text" v-model="clinicno"/></td>
            <td>姓名</td>
            <td><input type="text" v-model="name"/></td>
            <td>年龄</td>
            <td>
              <input type="text" class="collar_cont_head_age" v-model="beginage"/>
              <span class="collar_cont_head_ageText">至</span>
              <input type="text" class="collar_cont_head_age" v-model="endage"/>
              <!--<select class="collar_cont_head_ageUnit" v-model="ageunit">-->
                <!--<option>岁</option>-->
                <!--<option>月</option>-->
                <!--<option>日</option>-->
              <!--</select>-->
            </td>
            <td>性别</td>
            <td>
              <select v-model="sex">
                <option></option>
                <option>男</option>
                <option>女</option>
              </select>
            </td>
            <td>设备类型</td>
            <td>
              <select v-model="eqptypecode">
                <option></option>
                <option v-for="eqptype in eqptypeList" :value="eqptype.code">{{eqptype.name}}</option>
              </select>
            </td>
          </tr>
          <tr>
            <td>检查日期</td>
            <td><input type="date" v-model="begintime"/></td>
            <td style="text-align-last: center;">至</td>
            <td><input type="date" v-model="endtime"/></td>
            <td>影像数量</td>
            <td>
              <input type="text" class="collar_cont_head_num" v-model="beginpicnum">
              <span class="collar_cont_head_numText">至</span>
              <input type="text" class="collar_cont_head_num" v-model="endpicnum"/>
            </td>
            <td>检查部位</td>
            <td>
              <select v-model="partcode">
                <option></option>
                <option v-for="part in basepartList" :value="part.code">{{part.name}}</option>
              </select>
            </td>
            <td>申请科室</td>
            <td>
              <select v-model="applydeptcode">
                <option></option>
                <option v-for="dept in deptList" :value="dept.code">{{dept.name}}</option>
              </select>
            </td>
          </tr>
          <tr>
            <td>报告医师</td>
            <td>
              <select v-model="repusercode">
                <option></option>
                <option v-for="user in usepacsList" :value="user.code">{{user.name}}</option>
              </select>
            </td>
            <td>检查状态</td>
            <td>
              <select v-model="statuscode">
                <option></option>
                <option value="1">已登记</option>
                <option value="5">已拍片</option>
                <option value="10">已分配</option>
                <option value="15">预审核</option>
                <option value="20">已审核</option>
                <option value="25">已打印</option>
                <option value="30">已取片</option>
              </select>
            </td>
            <td>是否领片</td>
            <td>
              <select v-model="isdraw">
                <option></option>
                <option>是</option>
                <option>否</option>
              </select>
            </td>
            <td colspan="2" class="collar_cont_head_btn"><button class="button btn_blur">查询</button></td>
          </tr>
        </table>
      </div>
      <div class="collar_content">
        <table class="collar_contentTable">
          <thead>
          <tr>
            <th>影像号</th>
            <th>姓名</th>
            <th>性别</th>
            <th>年龄</th>
            <th>出生日期</th>
            <th>检查编号</th>
            <th>检查部位</th>
            <th>图像数量</th>
            <th>拍片时间</th>
            <th>报告医师</th>
            <th>操作</th>
          </tr>
          </thead>
          <tbody>
          <tr v-for="pat in patList">
            <td>{{pat.accessno}}</td>
            <td>{{pat.cname}}</td>
            <td>{{pat.sex}}</td>
            <td>{{pat.age}}</td>
            <td>{{pat.birthdayStr}}</td>
            <td>{{pat.accessno}}</td>
            <td>{{pat.partname}}</td>
            <td>{{pat.picnum}}</td>
            <td>{{pat.phototime}}</td>
            <td>{{pat.repusercode}}</td>
            <td>
              <button class="button">签名</button>
              <button class="button collar_btn_revocation">撤销</button>
            </td>
          </tr>
          <tr>
            <td>患者编号</td>
            <td>姓名</td>
            <td>性别</td>
            <td>年龄</td>
            <td>出生日期</td>
            <td>检查编号</td>
            <td>检查部位</td>
            <td>图像数量</td>
            <td>拍片时间</td>
            <td>报告医师</td>
            <td>
              <button class="button">签名</button>
              <button class="button collar_btn_revocation">撤销</button>
            </td>
          </tr>
          <tr>
            <td>患者编号123</td>
            <td>姓名</td>
            <td>性别</td>
            <td>年龄</td>
            <td>出生日期</td>
            <td>检查编号</td>
            <td>检查部位</td>
            <td>图像数量</td>
            <td>拍片时间</td>
            <td>报告医师</td>
            <td>
              <button class="button">签名</button>
              <button class="button collar_btn_revocation">撤销</button>
            </td>
          </tr>
          <tr>
            <td>患者编号321</td>
            <td>姓名</td>
            <td>性别</td>
            <td>年龄</td>
            <td>出生日期</td>
            <td>检查编号</td>
            <td>检查部位</td>
            <td>图像数量</td>
            <td>拍片时间</td>
            <td>报告医师</td>
            <td>
              <button class="button">签名</button>
              <button class="button collar_btn_revocation">撤销</button>
            </td>
          </tr>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</template>

<script>
  import Header from '@/components/Header/Header'
  import { MessageBox,Notification } from 'element-ui'
  import {getButtonPermission} from '@/api/user';
    export default {
      components: {
        'v-header': Header
      },
      created () {
        this.$http.get(window.localStorage.url+"/base/getDept")
          .then(function (res) {
            // console.log(res.data);
            if(res.data.status=='SUCCESS'){
              this.deptList=res.data.data;
            }
          });

        this.$http.get(window.localStorage.url+"/base/getDeptEqpEqptypeByActor")
          .then(function (res) {
            // console.log(res.data);
            if(res.data.status=='SUCCESS'){
              this.eqptypeList=res.data.eqptypeList;
              // this.equipList=res.data.equipList;
            }
          });

        this.$http.get(window.localStorage.url+"/user/getList")
          .then(function (res) {
            // console.log(res.data);
            if(res.data.status=='SUCCESS'){
              this.usepacsList=res.data.data;
            }
          });

        this.$http.get(window.localStorage.url+"/base/getPart")
          .then(function (res) {
            // console.log(res.data);
            if(res.data.status=='SUCCESS'){
              this.basepartList=res.data.data;
            }
          });
      },
      data () {
        return {
          deptList:[],
          eqptypeList:[],
          // equipList:[],
          usepacsList:[],
          basepartList:[],

          clinicno:'',
          name:'',
          beginage:'',
          endage:'',
          ageunit:'岁',
          sex:'',
          eqptypecode:'',
          begintime:'',
          endtime:'',
          beginpicnum:'',
          endpicnum:'',
          partcode:'',
          applydeptcode:'',
          statuscode:'',
          isdraw:'',
          repusercode:'',

          patList:[],
        }
      },
      methods:{

      },
      mounted(){

      }
    }
</script>

<style scoped>
  .collar_cont_headPar{
    background: #fff;
    margin: 10px auto;
    padding: 5px 0;
  }
  .collar_cont_head{
    line-height: 40px;
    width: 95%;
    margin: 0 auto;
  }
  .collar_cont_head tr td:nth-child(1){width: 7%;}
  .collar_cont_head tr td:nth-child(2){width: 13%;}
  .collar_cont_head tr td:nth-child(3){width: 5%;}
  .collar_cont_head tr td:nth-child(4){width: 15%;}
  .collar_cont_head tr td:nth-child(5){width: 5%;}
  .collar_cont_head tr td:nth-child(6){width: 15%;}
  .collar_cont_head tr td:nth-child(7){width: 5%;}
  .collar_cont_head tr td:nth-child(8){width: 15%;}
  .collar_cont_head tr td:nth-child(9){width: 5%;}
  .collar_cont_head tr td:nth-child(10){width: 15%;}
  .collar_cont_head tr td:nth-child(odd){
    text-align: justify;
    padding: 0 5px;
    text-align-last: justify;
  }
  .collar_cont_head tr td input,.collar_cont_head tr td select{
    width: 100%;
  }
  .collar_cont_head tr td input.collar_cont_head_age{
    width: 40%;
    display: block;
    float: left;
    position: relative;
    top: 8px;
  }
  .collar_cont_head tr td .collar_cont_head_ageText{
    width: 20%;
    float: left;
    text-align: center;
  }
  .collar_cont_head tr td select.collar_cont_head_ageUnit{
    width: 35%;
    display: block;
    float: left;
  }
  .collar_cont_head tr td input.collar_cont_head_num{
    width: 40%;
    display: block;
    float: left;
    margin-top: 7px;
  }
  .collar_cont_head tr td .collar_cont_head_numText{
    width: 20%;
    display: block;
    float: left;
    text-align: center;
  }
  .collar_cont_head_btn{
    text-align: center;
  }
  .collar_cont_head_btn button{
    height: 32px;
    padding: 0 30%;
    margin:  0 auto;
    display: block;
  }




  /*内容列表*/
  .collar_content{
    width: 100%;
    margin: 15px auto 0;
    background: #fff;
  }
  .collar_contentTable{
    width: 100%;
    text-align: center;
    line-height: 36px;
  }
  .collar_contentTable tr td{
    border: 1px solid #ddd;
  }
  .collar_contentTable thead tr{
    background: #999;
    color: #fff;
  }
  .collar_contentTable tbody tr{
    cursor: pointer;
  }
  .collar_contentTable tbody tr:hover{
    background: #f6f6ff;
  }
  .collar_contentTable tbody tr td button{
    width: 30%;
    margin: 0 3%;
    height: 28px;
    border-radius: 3px;
    border: 1px solid #ddd;
  }

</style>
